package timing.ukulele.third.service.weixin;

import org.springframework.stereotype.Service;
import timing.ukulele.data.third.view.weixin.WxMenuRuleVO;
import timing.ukulele.third.convertor.weixin.WxMenuRuleConverter;
import timing.ukulele.third.mapper.wexin.WxMenuRuleMapper;
import timing.ukulele.third.persistent.weixin.WxMenuRule;
import timing.ukulele.third.service.common.BaseOperatorService;
import java.util.List;

/**
 * 微信自定义菜单分组
 */
@Service
public class WxMenuRuleService extends BaseOperatorService<WxMenuRuleMapper, WxMenuRule> {

    public List<WxMenuRuleVO> allListByAppId(String appId) {
        List<WxMenuRule> list = this.lambdaQuery().eq(WxMenuRule::getAppId, appId).list();
        return WxMenuRuleConverter.INSTANCE.p2vList(list);
    }

}
